#ifndef _CINDICATOR_SMA_H
#define _CINDICATOR_SMA_H
namespace GSTrader
{
	namespace Indicator
	{
		class INDICATOR_API SMA : public CIndicator
		{
		public:
			SMA();
			SMA(CSeries* pInput, int nLength, int nWeight, int nBarType);
			virtual ~SMA();

			virtual CIndicator* CreateInstance();

			void SetParam(int nLength, int nWeight, int nBarType);
			virtual void SetParam(double* pdParam);
			virtual double Calculate(int nIndex);
			virtual void RefreshData();

		private:
			int m_nLength;
			int m_nBarType;
			int m_nWeight;
		};
	}
}

#endif // _CINDICATOR_SMA_H
